import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/page/layout/layout'
import Home from '@/page/home/index'
import Trade from '@/page/trade/index'
import Learn from '@/page/learn/index'
import Order from '@/page/order/index'
import Login from '@/page/login/index'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/home',
      children: [
        {
          path: '/home',
          name: 'home',
          component: Home
        },
        {
          path: '/trade',
          name: 'trade',
          component: Trade
        },
        {
          path: '/learn',
          name: 'learn',
          component: Learn
        },
        {
          path: '/order',
          name: 'order',
          component: Order
        }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    }
  ]
})
